package geeksforgeeks.trees;

import geeksforgeeks.trees.TreeTraversals.Node;

public class MirrorTree {
	public static void main(String[] args) {
		Node root = new Node(3);

		root.left = new Node(1);

		root.right = new Node(5);
		
		TreeTraversals.printInOrder(root);
		makeMirror(root);
		System.out.println("Mirror");
		TreeTraversals.printInOrder(root);
		
	}

	public static void makeMirror(Node root) {
		if(root == null)
			return;
		makeMirror(root.left);
		makeMirror(root.right);
		Node t = root.left;
		root.left = root.right;
		root.right = t;
	}


	

}
